import {
  createBrowserRouter,
} from "react-router-dom";
import Root from "./root";
import ErrorPage from "./error-page";
import EditContact from "../views/form";
import IndexPage from "../views";
import Foo from "../views/foo";

export const router = createBrowserRouter([
  {
    path: "/",
    element: <Root/>,
		errorElement: <ErrorPage />,
		children:[
			{
				path: '/',
				element: <IndexPage/>
			},
			{
				path: '/form',
				element: <EditContact />
			},
			{
				path: '/foo',
				element: <Foo />
			},
		]
  },
]);